package com.github.chirspan.xaas.gateway.service;

import com.github.chirspan.xaas.core.rest.RestResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * *******description*******
 * <p>
 * *************************
 *
 * @author chenpan
 * @date 2020/5/26 09:55
 */
public interface OAuthClient {

    @GetMapping("/oauth/check_token")
    RestResult checkToken(@RequestParam(name = "token") String token);

    @GetMapping("/oauth/check_permission")
    Boolean checkPermission(@RequestParam(name = "token") String token,
                            @RequestParam(name = "requestUri") String requestUri,
                            @RequestParam(name = "requestMethod") String requestMethod);

}
